home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
C2SND201.ZIP
/
PPWAV.DOC
< prev
next >
Wrap
Text File
|
1994-09-11
|
5KB
|
120 lines
Ppwav, RIFF WAVE File Preprocessor
----------------------------------
Version 1.0
Written by:
Jeffrey L. Hayes
130 Forest Ave., Lot 1
Orono, Me. 04473
(207) 866-7903
Internet: tvdog@delphi.com
This program is in the public domain.
Ppwav (preprocess .wav) performs 3 types of conversions of a
.wav file to reduce its size. All of these conversions can be
done with Sox (see Conv2snd.doc) but Ppwav is much faster and
easier to use. Ppwav needs about 53k of free RAM for its
buffers.
To use Ppwav, type its name followed by the input file name and
the output file name, e.g.:
PPWAV PING1.WAV PG.WAV
On my system, this will start up Ppwav on PING1.WAV, a 16-bit
stereo 44kHz .wav and create a new sound file, PG.WAV. (In
case you're wondering, PING1.WAV is a sonar ping taken from the
movie "Hunt for Red October.") File extensions must be
specified.
Ppwav will then display some statistics on the input file, for
example:
Input file: PING1.WAV
2 channels
44100 samples per second (Hz)
16 bits per channel
samples are signed
It will then ask you what conversions you want to do:
Mix to mono? (Y/n)
Convert to 8-bit? (Y/n)
Halve sampling rate? (y/N)
The first two conversions are the default, as indicated by the
uppercase "Y". They will be done unless you enter "n" or "N"
at the prompt. The last conversion will not be done unless you
enter "y" or "Y". The conversion may take up to a minute or so
if you work from the hard drive, depending on the length of the
file. If you don't want to convert, just find out what kind of
.wav it is, hit <cntrl>-C at the prompt (an empty output file
will be created, so use NUL as the output file to do this).
All of these conversions will reduce the size of the file.
With the Tandy DAC, mixing to mono and converting to 8-bit do
not affect the sound quality since those conversions have to be
done by the player anyway; 8-bit mono sound is all the Tandy
chip supports. Halving the sampling rate will adversely affect
the sound quality, however, and you should only do this as a
last resort. I find that 22kHz is about the minimum for
acceptable music, and 11kHz for speech. Halving the sampling
rate is done by discarding every other sample.
If you haven't noticed, standard sampling rates are 5.5kHz,
11kHz, 22kHz and 44kHz. 44kHz 16-bit stereo is what audio CD's
are recorded at. Sound.pdm supports 5.5kHz, 11kHz, and 22kHz.
Ppwav can also handle some rare .wav types: sampling rates
greater than 65535Hz, more than 2 channels, and more than 16
bits per channel. At least I think it will, it's supposed to.
I've never seen a .wav like that. It will not handle all
possible .wav's, however (just all that you are likely to see).
Ppwav doesn't display anything else unless something goes
wrong. Here are the error messages:
Usage: PPWAV <input file> <output file>
- see docs for details.
You get this message if you don't specify an input file and an
output file on the command line. There is no default for the
output file; you have to specify it.
Error opening input file.
You get this message if the file you specified as the input
file does not exist. There is a remote possibility of some
other cause, but probably you mistyped.
Unable to create output file.
DOS reported that the output file could not be created. Check
to make sure that you specified a valid filename. Also check
to make sure that the diskette you're putting the output file
on is not write-protected, if you're using floppies.
Error reading input .wav file.
DOS reported an error reading the input file. This probably
means that the disk structure is corrupt, and you should run
Chkdsk to find out. Ppwav does not replace the default
critical error handler, so if you have a bad spot on the disk,
you will get the infamous "Abort, Retry, Ignore, Fail?" message
instead of this one. "Ignore" to continue; the output file may
have a short "click" in it, at most.
Error writing output .wav file.
The disk structure is probably corrupt. Ppwav ignores a full
disk; you just get as much of the output file as will fit.
Note that not all .wav players will be able to play the frag-
ment.
Input .wav file invalid or unsupported type.
The input file specified is not a .wav or is corrupt, or it is
one of the rare .wav types that Ppwav does not recognize.